//
// Created by madison on 2022/1/11.
//

#include <stdio.h>

// 预处理器
#define  message_for(a, b)  \
    printf(#a " and " #b ": We love you!\n")

// 标记粘贴运算符（##）
#define tokenpaster(n) printf ("token" #n " = %d\n", token##n)

#if !defined (MESSAGE)
#define MESSAGE "You wish!"
#endif

#define MAX(x, y) ((x) > (y) ? (x) : (y))

main() {

    // 预定义宏
    printf("File :%s\n", __FILE__);
    printf("Date :%s\n", __DATE__);
    printf("Time :%s\n", __TIME__);
    printf("Line :%d\n", __LINE__);
    printf("ANSI :%d\n", __STDC__);

    // 预处理器运算符
    message_for(Carole, Debra);

    int token34 = 40;
    tokenpaster(34);

    printf("Here is the message: %s\n", MESSAGE);

    printf("Max between 20 and 10 is %d\n", MAX(10, 20));
}